package com.app.aipass.activity;

import android.os.Bundle;

import androidx.lifecycle.ViewModelProviders;

import com.app.aipass.BR;
import com.app.aipass.R;
import com.app.aipass.app.AppViewModelFactory;
import com.app.aipass.databinding.ActivityForgetPwdFirstBinding;
import com.app.aipass.databinding.ActivityForgetPwdSecondBinding;
import com.app.aipass.viewmodel.LoginViewModel;

import me.goldze.mvvmhabit.base.BaseActivity;

public class ForgetPwdSecondActivity extends BaseActivity<ActivityForgetPwdSecondBinding, LoginViewModel> {

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_forget_pwd_second;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public LoginViewModel initViewModel() {
        //使用自定义的ViewModelFactory来创建ViewModel，如果不重写该方法，则默认会调用NetWorkViewModel(@NonNull Application application)构造方法
        AppViewModelFactory factory = AppViewModelFactory.getInstance(getApplication());
        return ViewModelProviders.of(this, factory).get(LoginViewModel.class);
    }
}
